/********************************************************************
	created:		2009:1:14   21:31
	filename: 	crawler.h
	author:		kong
	E-mail:		guoqing.kong@gmail.com
	purpose:	crawler
*********************************************************************/
#pragma once
#include <string>
#include <vector>
#include "URLEncode.h"

using namespace std;

class Abstractcrawler
{
public:
	Abstractcrawler(void){};
	virtual ~Abstractcrawler(void) {};
	virtual int crawl(string from , string to ,string date)=0;
public:
	string content;
	string url;
};

class Crawler_58com :public Abstractcrawler
{
public:
	Crawler_58com () {};
	~Crawler_58com(){};
public:
	int crawl(string from ,string to ,string date);
private:
	string  buildUrl(string from ,string to ,string date);
	string  setInterval(const string date);

	CURLEncode dc;
};


